package lm.concurrency.day1;

import lm.concurrency.util.Constants;
import lm.concurrency.util.FileReader;
import lombok.extern.slf4j.Slf4j;

/**
 * @Auther: Min.Liu
 * @Description: 执行线程为啥不用run
 * @Date: Created in 17:07 2024/6/3
 */
@Slf4j
public class StartWithRunTest {
    public static void main(String[] args) {
        Thread t1 = new Thread("t1") {
            @Override
            public void run() {
                log.debug("running...");
                FileReader.read(Constants.MP4_FULL_PATH);
            }
        };

        t1.start();
        //t1.run(); 依然由主线程调用 是并发执行的
        log.debug("do other things...");
    }
}
